function [f] = secretballot(x)

p=(1+tanh(x(1)))/2.0;
k=x(2);

Ob0 = 70;
Ob1 = 8;
Ob2 = 114;


lambda = 10000;

% for A type
%zz1  = exp(u0)+exp(u1)+exp(u2);
prA0 = 0;
prA1 = 1;
prA2 = 0;

% for B type
zz2 = exp(k)+exp(k);
prB0 = exp(k) / zz2;
prB1 = 0;
prB2 = exp(k) / zz2;

P0= (prA0*p+prB0*(1-p));
P1= (prA1*p+prB1*(1-p));
P2= (prA2*p+prB2*(1-p));



f = - Ob0*log(P0) - Ob1*log(P1) - Ob2*log(P2);
end